#include<iostream>
#include<cstring>
#include<string>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t--) {
		string str;
		cin >> str;
		bool flag = 1;
		if (str.size() % 2) {
			flag = 0;
		}
		for (int i = 0; i < str.size() / 2; i++) {
			if (str[i] != str[str.size() / 2 + i]) {
				flag = 0;
				break;
			}
		}
		if (flag) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}